Proving correctness of imperative programs by linearizing constrained Horn clauses

نویسندگان

  • Emanuele De Angelis
  • Fabio Fioravanti
  • Alberto Pettorossi
  • Maurizio Proietti
چکیده

We present a method for verifying the correctness of imperative programs which is based on the automated transformation of their specifications. Given a program prog, we consider a partial correctness specification of the form {φ} prog {ψ}, where the assertions φ and ψ are predicates defined by a set Spec of possibly recursive Horn clauses with linear arithmetic (LA) constraints in their premise (also called constrained Horn clauses). The verification method consists in constructing a set PC of constrained Horn clauses whose satisfiability implies that {φ} prog {ψ} is valid. We highlight some limitations of state-ofthe-art constrained Horn clause solving methods, here called LA-solving methods, which prove the satisfiability of the clauses by looking for linear arithmetic interpretations of the predicates. In particular, we prove that there exist some specifications that cannot be proved valid by any of those LA-solving methods. These specifications require the proof of satisfiability of a set PC of constrained Horn clauses that contain nonlinear clauses (that is, clauses with more than one atom in their premise). Then, we present a transformation, called linearization, that converts PC into a set of linear clauses (that is, clauses with at most one atom in their premise). We show that several specifications that could not be proved valid by LA-solving methods, can be proved valid after linearization. We also present a strategy for performing linearization in an automatic way and we report on some experimental results obtained by using a preliminary implementation of our method. To appear in Theory and Practice of Logic Programming (TPLP), Proceedings of ICLP 2015.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Proving Horn Clause Specifications of Imperative Programs

We present a method for verifying the correctness of an imperative program with respect to a specification defined in terms of a set of possibly recursive Horn clauses. Given a program prog, we consider a partial correctness specification of the form {φ} prog {ψ}, where the assertions φ and ψ are predicates defined by a set Spec of Horn clauses. The verification method consists in: (i) encoding...

متن کامل

Predicate Pairing for Program Verification

It is well-known that the verification of partial correctness properties of imperative programs can be reduced to the satisfiability problem for constrained Horn clauses (CHCs). However, state-of-the-art solvers for constrained Horn clauses (or CHC solvers) based on predicate abstraction are sometimes unable to verify satisfiability because they look for models that are definable in a given cla...

متن کامل

Verifying Relational Program Properties by Transforming Constrained Horn clauses

We present a method for verifying relational program properties, that is, properties that relate the input and the output of two programs. Our verification method is parametric with respect to the definition of the semantics of the programming language in which the programs are written. That definition consists of a set Int of constrained Horn clauses (CHC) that encode the interpreter of the pr...

متن کامل

Automating Regression Verification of Pointer Programs by Predicate Abstraction

Regression verification is an approach complementing regression testing with formal verification. The goal is to formally prove that two versions of a program behave either equally or differently in a precisely specified way. In this paper, we present a novel automatic approach for regression verification that reduces the equivalence of two related imperative pointer programs to constrained Hor...

متن کامل

Removing Unnecessary Variables from Horn Clause Verification Conditions

Verification conditions (VCs) are logical formulas whose satisfiability guarantees program correctness. We consider VCs in the form of constrained Horn clauses (CHC) which are automatically generated from the encoding of (an interpreter of) the operational semantics of the programming language. VCs are derived through program specialization based on the unfold/fold transformation rules and, as ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • TPLP

دوره 15  شماره 

صفحات  -

تاریخ انتشار 2015